package com.multi.source.domain;

import com.multi.common.annotation.Excel;
import com.multi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 数据库概要对象 bk_data_base_info
 *
 * @author pzj
 * @date 2024-11-20
 */
@Data
@Accessors(chain = true)
public class BkDataBaseInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 数据库名
     */
    @Excel(name = "数据库名")
    @NotBlank(message = "数据库名称不能为空")
    @Length(max = 16)
    private String dbName;

    /**
     * 数据库IP
     */
    @Excel(name = "数据库IP")
    @NotBlank(message = "数据库Ip不能为空")
    @Pattern(regexp = "^[0-9]*.[0-9]*.[0-9]*.[0-9]*$",message = "请规范IP格式")
    private String dbIp;

    /**
     * 数据库类型
     */
    @Excel(name = "数据库IP类型", readConverterExp = "0=内网,1=公网")
    @NotBlank(message = "数据库IP类型不能为空")
    private String dbIpType;

    /**
     * 数据库端口
     */
    @Excel(name = "数据库端口")
    @NotNull(message = "数据库端口不能为空")
    private Long dbPort;

    /**
     * 业务数据库数量
     */
    @Excel(name = "业务数据库数量")
    private Long serviceDbNums;

    /**
     * 数据库大小
     */
    @Excel(name = "数据库大小")
    private Long dbSize;

    /**
     * 删除标记
     */
    private Long isDel;


}
